import { configureStore } from '@reduxjs/toolkit'
// 导入切片
import auth from './authSlice'
// 定义并导出仓库
export const store = configureStore({
    reducer: { auth },
    middleware: (getDefaultMiddleware) => getDefaultMiddleware({
        serializableCheck: false,
    })
})
// 导出dispatch的类型
export type Dispatch = typeof store.dispatch
// 导出根reducer的类型
export type State = ReturnType<typeof store.getState>